<template>
  <div class="container-wrapper">
    <div class="container" ref="container">
    </div>
  </div>
</template>

<script setup lang="ts">
import { nextTick, ref } from 'vue';
import { getobjm } from '../scripts/getobjm';
const objm = getobjm();
const container = ref<HTMLDivElement>();
nextTick(() => {
  if (!container.value) return;
  const opt = {
    container: container.value,
    type: "ESUeViewer" as const,
    options: {
      uri: 'http://localhost:9007/',
      app: 'earthsdk3'
      // uri: 'http://114.242.26.126:30001/',
      // app: 'earthsdk3-ysp'
    }
  }
  const viewer = objm.createUeViewer(opt);
  console.log(viewer);
})


</script>
<style scoped>
.container-wrapper,
.container {
  width: 100%;
  height: 100%;
}
</style>
